POV-Ray : Newsgroups : povray.newusers : simulating cracks in surface using normals : Re: simulating cracks in surface using normals Server Time
29 Jul 2024 04:26:49 EDT (-0400)
  Re: simulating cracks in surface using normals  
From: Toon
Date: 26 Oct 2006 12:15:00
Message: <web.4540ddd084a00c02109a9bf40@news.povray.org>
> try crackle with a user defined slope_map, you may also need to play with
> the form values though the default should be adequate.  See the docs for
> more help on the crackle pattern and slope_map.
>
> -tgq

Thanks for all the tips, after playing around with crackle and slope_maps, I
can get someting that looks a little like what I want, but not entirely. I
can't seem to get any really deep cracks. Maybe someone can tell me what I
am doing wrong? I'd like to create a scaleable Cracks normal with
AmountOfCracks, CracksDepth and CracksLength settings. Anybody any idea?
(Any other ideas to get the clay more realistic are also welcome!)The code
for some claylike spheres that illustrate the problem is the following:

camera {look_at <0.0,0,0>
        location <-5 , 0.0 , -50>
       }

global_settings {radiosity {}}

#include "colors.inc"

light_source{<1000,1000,-1000>  color rgb 0.5}

sky_sphere {pigment{color rgb 2}}

plane { y, -6 texture {pigment {color rgb <1,1,1>} finish {ambient 0.1
diffuse 0.2}}}

plane {z, 1000 pigment {color rgb 0.5}}

#declare MouldedLook=normal{bozo -8 scale 3 }
#declare Cracks=normal{crackle
                       scale 10
                       turbulence <0.7,0.5,0>
                       slope_map {[0, <-1,0>]
                                  [0.01 <-1,0>]
                                  [0.01 <0,0>]
                                  [1 <0,0>]
                                 }
                      }
#declare NoNormal=normal{bumps 0.00001}
#declare MouldedCracks=normal{average
normal_map{[1,MouldedLook][1,Cracks][-1,NoNormal]}}

sphere { <0,0,0>,6 texture{pigment{color Orange} normal{Cracks} finish
{ambient 0 diffuse 0.6}} translate <-10,0,0> }
sphere { <0,0,0>, 6 texture{pigment{color Orange} normal{MouldedLook}}
finish {ambient 0 diffuse 0.6}translate <0,0,0> }
sphere { <0,0,0>,6 texture{pigment{color Orange} normal{MouldedCracks}}
finish {ambient 0 diffuse 0.6} translate <10,0,0> }


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.